/*
* pps-cloud
*/
package com.pitop.material.entity;

/**
* 供应料材 的实体类的状态
*
* @author berton
*/
public enum MaterialState implements java.io.Serializable {
    //枚举定义在此
    Enable("启用"),
    Disable("禁用"),;

    public String val;
    MaterialState(String val) {
        this.val = val;
    }

    /**
    * 根据状态名称查询状态
    *
    * @param stateName
    * @return
    */
    public static MaterialState getEnum(String stateName) {
        for (MaterialState materialState : MaterialState.values()) {
            if (materialState.name().equalsIgnoreCase(stateName)) {
                return materialState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
         return this.name();
    }

}
